package com.lineage.data.item_etcitem.add;

import com.lineage.data.executor.ItemExecutor;
import com.lineage.server.model.Instance.L1ItemInstance;
import com.lineage.server.model.Instance.L1PcInstance;
import com.lineage.server.serverpackets.S_NPCTalkReturn;
import com.lineage.server.serverpackets.ServerBasePacket;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class tfcount_item extends ItemExecutor {
  private static final Log _log = LogFactory.getLog(tfcount_item.class);
  
  public static ItemExecutor get() {
    return new tfcount_item();
  }
  
  public void execute(int[] data, L1PcInstance pc, L1ItemInstance item) {
    if (item == null)
      return; 
    if (pc == null)
      return; 
    String[] info = new String[11];
    if (pc.get_other2().get_TfCount() > 0) {
      info[0] = String.valueOf(pc.get_other2().get_TfCount());
    } else {
      info[0] = "0";
    } 
    if (pc.get_other2().get_Str() > 0) {
      info[1] = String.valueOf(pc.get_other2().get_Str());
    } else {
      info[1] = "0";
    } 
    if (pc.get_other2().get_Dex() > 0) {
      info[2] = String.valueOf(pc.get_other2().get_Dex());
    } else {
      info[2] = "0";
    } 
    if (pc.get_other2().get_Int() > 0) {
      info[3] = String.valueOf(pc.get_other2().get_Int());
    } else {
      info[3] = "0";
    } 
    if (pc.get_other2().get_Attack() > 0) {
      info[4] = String.valueOf(pc.get_other2().get_Attack());
    } else {
      info[4] = "0";
    } 
    if (pc.get_other2().get_BowAttack() > 0) {
      info[5] = String.valueOf(pc.get_other2().get_BowAttack());
    } else {
      info[5] = "0";
    } 
    if (pc.get_other2().get_Hp() > 0) {
      info[6] = String.valueOf(pc.get_other2().get_Hp());
    } else {
      info[6] = "0";
    } 
    if (pc.get_other2().get_Mp() > 0) {
      info[7] = String.valueOf(pc.get_other2().get_Mp());
    } else {
      info[7] = "0";
    } 
    if (pc.get_other2().get_ReductionDmg() > 0) {
      info[8] = String.valueOf(pc.get_other2().get_ReductionDmg());
    } else {
      info[8] = "0";
    } 
    if (pc.get_other2().get_Sp() > 0) {
      info[9] = String.valueOf(pc.get_other2().get_Sp());
    } else {
      info[9] = "0";
    } 
    if (pc.get_other2().get_Mr() > 0) {
      info[10] = String.valueOf(pc.get_other2().get_Mr());
    } else {
      info[10] = "0";
    } 
    pc.sendPackets((ServerBasePacket)new S_NPCTalkReturn(pc.getId(), "tfcount", info));
  }
}
